/* 
 * AUTHOR: Kevin Lam
 */

package com.apps.ubc.cc.controller;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import com.apps.ubc.cc.model.ExamModel;
import com.apps.ubc.cc.model.WorklistModel;

public class ExamViewController extends HttpServlet {
	
	public void doGet(HttpServletRequest req, HttpServletResponse resp) {
		String email = req.getParameter("email");
		try {
			ExamModel em = new ExamModel(email);
			HttpSession s = req.getSession();
			s.setAttribute("exam", em);
			req.getRequestDispatcher("/exams.jsp").forward(req, resp);
		} catch (ServletException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}
		
	}

}
